<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <div th:include="common/head_info::head_infor"></div>
    <script type="text/javascript" th:src="@{../js/moment-with-locales.min.js}"></script>
    <link rel="stylesheet" type="text/css" th:href="@{../css/bootstrap-datetimepicker.css}">
    <script type="text/javascript" th:src="@{../js/bootstrap-datetimepicker.js}"></script>
    <script type="text/javascript" th:src="@{../js/bootstrap-datetimepicker.zh-CN.js}"></script>
    <script type="text/javascript" th:src="@{../js/paging.js}"></script>
    <script type="text/javascript" th:src="@{../js/associatorManage.js}"></script>
    <link rel="stylesheet" type="text/css" th:href="@{../css/paging.css}">
    <title>Title</title>
</head>
<body>
<div class="container center" style="margin-top: 20px;">
    <form class="navbar-form navbar-left" role="search">
        <div class="form-group">
            <input type="text" name="phone"  id="phone" class="form-control" placeholder="手机号">
            <input type="text" class="form-control" id="datetimeStart" name="starttime" readonly>
            --
            <input type="text" class="form-control" id="datetimeEnd" name="endtime" readonly>
        </div>
        <button type="button" class="btn btn-default" onclick="getData(1,6)">查找</button>
    </form>
    <div class="panel panel-default" >
        <!-- Table -->
        <table class="table" >
            <thead>
            <tr>
                <th >id</th>
                <th >手机号</th>
                <th >昵称</th>
                <th >真实姓名</th>
                <th >创建时间</th>
                <th  >操作</th>
            </tr>
            </thead>
            <tbody id="list"></tbody>
        </table>
    </div>
    <div id="pageing"></div>
</div>
<script>
    //日期插件初始化
    $('#datetimeStart').datetimepicker({
        language:  'zh-CN',
        format:'yyyy-mm-dd',
        weekStart: 1, /*以星期一为一星期开始*/
        todayBtn:  1,
        autoclose: 1,
        minView:2, /*精确到天*/
        pickerPosition: "bottom-left"
    }).on("changeDate",function(ev){  //值改变事件
        //选择的日期不能大于第二个日期控件的日期
        if(ev.date){
            $("#datetimeEnd").datetimepicker('setStartDate', new Date(ev.date.valueOf()));
        }else{
            $("#datetimeEnd").datetimepicker('setStartDate',null);
        }
    });
    $('#datetimeEnd').datetimepicker({
        language:  'zh-CN',
        format:'yyyy-mm-dd',
        weekStart: 1, /*以星期一为一星期开始*/
        todayBtn:  1,
        autoclose: 1,
        minView:2, /*精确到天*/
        pickerPosition: "bottom-left"
    }).on("changeDate",function(ev){
        /*选择的日期不能小于第一个日期控件的日期*/
        if(ev.date){
            $("#datetimeStart").datetimepicker('setEndDate', new Date(ev.date.valueOf()));
        }else{
            $("#datetimeStart").datetimepicker('setEndDate',new Date());
        }
    });

</script>
</body>
</html>